package smartcase.config.auth;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import smartcase.base.auth.TokenFlag;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@ConfigurationProperties(prefix = "auth-checkcfg")
@Data
public class AuthCheckConfiguration {

  private List<AuthGroup> authGroups = new ArrayList<>();

  @Data
  public static class AuthGroup implements Serializable {
    private String group;
    private String flagValue;
    private TokenFlag tokenFlag;
    private List<String> authPatterns;
    private List<String> excludeAuthPatterns;
  }
}
